home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 11 / CU Amiga Magazine's Super CD-ROM 11 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-06].iso / s / boxcolors.pprx < prev    next >
Text File  |  1992-03-14  |  944b  |  36 lines

  1. /*
  2. @BBoxColors  @P@ICopyright Gold Disk Inc. January, 1992
  3.  
  4. Set the text and fill colors of a box.
  5. */
  6.  
  7. address command
  8. call SafeEndEdit.rexx()
  9. call ppm_AutoUpdate(0)
  10. oldcolor = ppm_GetTextColor()
  11. box     = ppm_ClickOnBox("Click on box for color change.")
  12. if box  = 0 then exit
  13.  
  14. colorlist   = ppm_GetColorList()
  15. colorlist   = substr(colorlist, pos('0a'x, colorlist) + 1)
  16.  
  17. color   =  ppm_SelectFromList("Select Fill Color..", 20, 5, 0, colorlist)
  18. if color = '' then exit
  19. tcolor  =  ppm_SelectFromList("Select Text Color..", 20, 5, 0, colorlist)
  20. if tcolor = '' then exit
  21.  
  22. call ppm_SetBoxFrameData(box,color, color, ppm_GetLineWeight(), ppm_GetLinePattern(), 1)
  23. call ppm_SetBoxFrame(box, 1)
  24. call ppm_SetBoxTransparent(box, 0)
  25.  
  26. if upper(word(ppm_GetBoxInfo(box), 1)) ~= TEXT then exit
  27.  
  28. call SafeSetEdit.rexx(box)
  29. call ppm_SelectBoxText()
  30. call ppm_SetTextColor(tcolor)
  31. call SafeEndEdit.rexx()
  32.  
  33. call ppm_SetTextColor(oldcolor)
  34. call ppm_AutoUpdate(1)
  35.  
  36.